add stdin support, unit tests, and security audit ci#31
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Adds stdin support and expands test coverage for sslx, plus introduces a dependency security audit job in CI.
Changes:
- Support reading certificate/JWT input from stdin for
inspectanddecodevia-. - Add unit tests for certificate parsing, grading boundaries, expiry display, and time conversion.
- Add new integration tests and a CI
cargo-audit-based security audit job.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/integration.rs | Adds integration tests including stdin piping and live-host scenarios. |
| src/output/mod.rs | Adds unit tests for expiry_display formatting/color behavior. |
| src/main.rs | Updates CLI help text to document stdin usage (-). |
| src/commands/inspect.rs | Implements stdin support for inspect and factors rendering into run_certs. |
| src/commands/grade.rs | Exposes score_to_grade for testing and adds boundary tests. |
| src/commands/decode.rs | Implements stdin support for decode and reuses parsed certs via run_certs. |
| src/cert/parser.rs | Adds parse_cert_data and substantial parser unit test coverage. |
| src/cert/mod.rs | Exposes days_to_ymd for tests and adds CertTime/date conversion tests. |
| .github/workflows/ci.yml | Adds a new security audit job to CI. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
inspectanddecodecommands (sslx inspect -,sslx decode -)cargo-auditsecurity check added to CI pipelineTest plan
cargo testpasses (101 tests)cargo clippy -- -D warningscleancargo fmt --checkclean